<?php require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
 MYDCONN(); 
  $GLOBALS['MYT'] = $GLOBALS['MYD']; 
	form_pr('getOrders','','','post');
	?>
<div class="title">Ordens de Pagamento</div>
<table width="100%"  border="0" cellpadding="3" cellspacing="1">
    <tr bgcolor="#F2F2F2">
    <td>Periodo De: <?php mn_field('date','ED','DatePay',date("Y-m-01"),'getOrders','8','','');
	mn_field('button','ED','orView','Consultar a Pagamento','','','','" onclick="
    		document.getOrders.action=\'Modules/CentrodeCustos/Lib/rs_orders.php\';
    		subform(\'getOrders\',\'rsOrders\');
			document.getOrders.orGen.disabled=false;');
	echo ' | ';
	mn_field('button','ED','orGen','Nova Ordem de Pagamento','','','','" disabled onclick="
		if(document.getOrders.ref.value==\'\') {
			alert(\'Ordem vazia, nada a pagamento.\');
		} else {
			document.getOrders.action=\'_response/rsproxy.php?pr=cdc_orders\';
    		subform(\'getOrders\',\'trsOrders\');
		}');?></td><td><div id="trsOrders"></div></td>
    </tr>
</table>
<div id="rsOrders"></div>
</form>